﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using XPMVC.Controllers;
using XPMVC.Database;
namespace XPMVC
{
    public partial class Register : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                AuthController ac = new AuthController();

                var register = ac.Register(new Member() { username = loginUser.Text, email = loginEmail.Text, fname = loginFirstName.Text, points = 0, memberType = "Normal", passwordHash = loginPassword.Text });

                loginError.Visible = true;
                loginError.InnerText = register.Item2;
            }
        }
    }
}